﻿using ProMvc.Fliters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ProMvc.Controllers
{
    public class FliterController : Controller
    {
        //
        // GET: /Fliter/
        //[CustomAuth(false)]
        [CustomerAction]
        public ActionResult Index()
        {
            return View();
        }

        [RangeException]
        public string RangeTest(int id)
        {
            if(id>100)
            {
                return string.Format("The id value is {0}",id);
            }
            else
            {
                throw new ArgumentOutOfRangeException("id",id,"");
            }
        }

        [ProfileAction]
        public string FilterTest()
        {
            return "this is the action filter test action.";
        }
    }
}
